package com.yc.so.demo.jfoenix;

import com.jfoenix.controls.JFXTextField;
import com.jfoenix.validation.RequiredFieldValidator;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

import javax.swing.*;

public class Jfoenix extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) {
        JFXTextField field = new JFXTextField();
        field.setLabelFloat(true);
        field.setPromptText("Floating prompt");
        field.setPrefHeight(30);
        field.setPrefWidth(400);


        AnchorPane pane=new AnchorPane();
        pane.getChildren().addAll(field);
        Scene scene=new Scene(pane);
        stage.setScene(scene);
        stage.setWidth(652);
        stage.setHeight(72);
        stage.initStyle(StageStyle.TRANSPARENT);
        stage.show();
    }
}
